home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Tutorial
/
Cookbook
/
24.event_flags
/
MyView.m
< prev
next >
Wrap
Text File
|
1995-06-12
|
1KB
|
77 lines
/* Generated by Interface Builder */
#import "MyView.h"
#import <appkit/Control.h>
@implementation MyView
- setNone:anObject
{
none = anObject;
return self;
}
- setControl:anObject
{
control = anObject;
return self;
}
- setAlternate:anObject
{
alternate = anObject;
return self;
}
- setCommand:anObject
{
command = anObject;
return self;
}
- setShift:anObject
{
shift = anObject;
return self;
}
- drawSelf:(NXRect *)list:(int)count
{
NXEraseRect(&bounds);
return self;
}
- mouseDown:(NXEvent *)thisEvent
{
if (thisEvent->flags)
[none setIntValue:0];
else
[none setIntValue:1];
if (thisEvent->flags & NX_SHIFTMASK)
[shift setIntValue:1];
else
[shift setIntValue:0];
if (thisEvent->flags & NX_CONTROLMASK)
[control setIntValue:1];
else
[control setIntValue:0];
if (thisEvent->flags & NX_ALTERNATEMASK)
[alternate setIntValue:1];
else
[alternate setIntValue:0];
if (thisEvent->flags & NX_COMMANDMASK)
[command setIntValue:1];
else
[command setIntValue:0];
return(self);
}
@end